package libra;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * SpringBoot启动入口 
 * @author libra
 */
//标注该类为SpringBoot的主配置类
@SpringBootApplication
//指定包扫描
@ComponentScan(value={"libra","libraServer"})
// 扫描Servlet组件
@ServletComponentScan(value="libra")
/*
 * @EnableEurekaClient 与 @EnableDiscoveryClient
 * 在功能上是一致的：写在启动类的上，开启服务注册发现功能。
 * @EnableEurekaClient只适用于Eureka作为注册中心，@EnableDiscoveryClient 可以是其他注册中心。
 */
// 开启EurekaClient的注解，连接EurekaServer
@EnableEurekaClient
//@EnableDiscoveryClient
public class MainStart_Provider_10201 {
	public static void main(String[] args) {
		System.out.println("MainStart.main()");
		ConfigurableApplicationContext cac = SpringApplication.run(MainStart_Provider_10201.class, args);
	}
}
